package com.sdkj.service.seal;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.sdkj.dao.DaoSupport;
import com.sdkj.entity.Page;
import com.sdkj.util.PageData;


@Service("sealrecordService")
public class SealRecordService {

	@Resource(name = "daoSupport")
	private DaoSupport dao;
	
	/*
	* 用户印章申请
	*/
	public void save(PageData pd)throws Exception{
		dao.save("SealManagerMapper.save", pd);
	}
	
	/*
	* 管理员创建印章记录
	*/
	public void createRecord(PageData pd)throws Exception{
		dao.save("SealManagerMapper.createRecord", pd);
	}
	
	/*
	* 删除
	*/
	public void delete(PageData pd)throws Exception{
		dao.delete("SealManagerMapper.delete", pd);
	}
	
	/*
	* 修改
	*/
	public void edit(PageData pd)throws Exception{ 
		dao.update("SealManagerMapper.edit", pd);
	}
	
	/*
	* 审批记录修改
	*/
	public void recordEdit(PageData pd)throws Exception{ 
		dao.update("SealManagerMapper.recordEdit", pd);
	}
	
	/*
	*列表
	*/
	public List<PageData> recordListPage(Page page)throws Exception{
		return (List<PageData>)dao.findForList("SealManagerMapper.recordlistPage", page);
	}
	
	/*
	*列表(全部)
	*/
	public List<PageData> listAll(PageData pd)throws Exception{
		return (List<PageData>)dao.findForList("SealManagerMapper.listAll", pd);
	}
	
	/*
	* 通过id获取数据
	*/
	public PageData findById(PageData pd)throws Exception{
		return (PageData)dao.findForObject("SealManagerMapper.findById", pd);
	}
	
	/*
	* 批量删除
	*/
	public void deleteAll(String[] ArrayDATA_IDS)throws Exception{
		dao.delete("SealManagerMapper.deleteAll", ArrayDATA_IDS);
	}
	
}

